package com.example.makerspace.service.impl;

import com.example.makerspace.dto.*;
import com.example.makerspace.manager.*;
import com.example.makerspace.service.CampService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class CampServiceImpl implements CampService {
    @Resource
    private BookManager bookManager;
    @Resource
    private BookChapterManager bookChapterManager;
    @Resource
    private CourseManager courseManager;
    @Resource
    private CourseVideoManager courseVideoManager;
    @Resource
    private ExamManager examManager;
    @Resource
    private ExamQuestionManager examQuestionManager;

    @Override
    public Result bookList(PageRequest pageRequest) {
        return bookManager.list(pageRequest);
    }

    @Override
    public Result courseList(PageRequest pageRequest) {
        return courseManager.list(pageRequest);
    }

    @Override
    public Result courseDetail(CourseVideoDTO courseVideoDTO) {
        return courseVideoManager.detail(courseVideoDTO);
    }

    @Override
    public Result examDetail(ExamQuestionDTO examQuestionDTO) {
        return examQuestionManager.tocDetail(examQuestionDTO);
    }

    @Override
    public Result examSubmit(Map<String, Object> params) {
        return examQuestionManager.judge(params);
    }

    @Override
    public Result examList(PageRequest pageRequest) {
        return examManager.list(pageRequest);
    }

    @Override
    public Result bookDetail(BookChapterDTO bookChapterDTO) {
        return bookChapterManager.detail(bookChapterDTO);
    }

}
